<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="sever.*,util.*,entity.*,java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<body>
	<form action="StudentAdd.jsp" method="post">
		<h2>student表单</h2>
		<p>

	<label>姓名</label>
	<input type="text" required name="sname"/>
	
	</p>
	<p>
	<label>性别</label>
	<input type="text" required name="sex"/>
	</p>
	<p>
	<label>电话</label>
	<input type="text" required name="telephone"/>
	</p>
	<p>
	<label>qq</label>
	<input type="text" required name="qq"/>
	</p>
	<p>
	<label>微信</label>
	<input type="text" required name="wechat"/>
	</p>
	<!-- <p>
	<label>年级</label>
	<input type="text" required name="gradeid"/>
	</p> -->
	<p>
	<label>年级</label>
			<%
			GradeService s=new GradeService();
			List<Grade> list=s.findall2();
			
			%>
			<select name="gradeid">
				<%
				 for(Grade g:list){
				%>
				<option value="<%=g.getId()%>"><%=g.getGname()%></option>
				<%} %>
			</select>
			<!-- <input type="number" name="gradeid"> -->
		</p>
	<p>
	<label>入学日期</label>
	<input type="text" required name="enterdate"/>
	</p>
	<p>
	<label>来自哪个城市</label>
	<input type="text" required name="fromcity"/>
	</p>
	<p>
	<label>生日</label>
	<input type="text" required name="birthday"/>
	</p>
	<p>
	<label>地址</label>
	<input type="text" required name="address"/>
	</p>
	<p>
	<label>密码</label>
	<input type="text" required name="pass"/>
	</p>
	<p>
    <input type="submit" value="新增"/>
   </p>
		
	</form>
</body>
</body>
</html>